home *** CD-ROM | disk | FTP | other *** search
/ Champak 120 / Vol 120.iso / games / asteroid.swf / scripts / __Packages / com / evilfree / astroidsRevenge / Main.as < prev    next >
Encoding:
Text File  |  2010-11-09  |  67.7 KB  |  1,526 lines

  1. function ┬º\x01\x02┬º()
  2. {
  3.    return 1631 % 511 * 5;
  4. }
  5. var ┬º\x01┬º = 401 + "\x01\x02"();
  6. while(true)
  7. {
  8.    if(eval("\x01") == 891)
  9.    {
  10.       set("\x01",eval("\x01") - 363);
  11.       ┬º┬ºpush(true);
  12.    }
  13.    else if(eval("\x01") == 569)
  14.    {
  15.       set("\x01",eval("\x01") + 369);
  16.       ┬º┬ºpush(eval(function ┬º\x01\x02┬º()
  17.       {
  18.          return 1631 % 511 * 5;
  19.       }));
  20.    }
  21.    else if(eval("\x01") == 250)
  22.    {
  23.       set("\x01",eval("\x01") + 228);
  24.    }
  25.    else if(eval("\x01") == 899)
  26.    {
  27.       set("\x01",eval("\x01") - 330);
  28.       ┬º┬ºpush("\x0f");
  29.    }
  30.    else
  31.    {
  32.       if(eval("\x01") == 178)
  33.       {
  34.          set("\x01",eval("\x01") - 24);
  35.          break;
  36.       }
  37.       if(eval("\x01") == 938)
  38.       {
  39.          set("\x01",eval("\x01") - 515);
  40.          ┬º┬ºpush(!function ┬º\x01\x02┬º()
  41.          {
  42.             return 1631 % 511 * 5;
  43.          });
  44.       }
  45.       else if(eval("\x01") == 171)
  46.       {
  47.          set("\x01",eval("\x01") + 728);
  48.          var ┬º┬ºpop() = function ┬º\x01\x02┬º()
  49.          {
  50.             return 1631 % 511 * 5;
  51.          };
  52.       }
  53.       else if(eval("\x01") == 423)
  54.       {
  55.          set("\x01",eval("\x01") - 389);
  56.          if(function ┬º\x01\x02┬º()
  57.          {
  58.             return 1631 % 511 * 5;
  59.          })
  60.          {
  61.             set("\x01",eval("\x01") + 188);
  62.          }
  63.       }
  64.       else if(eval("\x01") == 837)
  65.       {
  66.          set("\x01",eval("\x01") - 343);
  67.          if(function ┬º\x01\x02┬º()
  68.          {
  69.             return 1631 % 511 * 5;
  70.          })
  71.          {
  72.             set("\x01",eval("\x01") - 261);
  73.          }
  74.       }
  75.       else if(eval("\x01") == 34)
  76.       {
  77.          set("\x01",eval("\x01") + 188);
  78.       }
  79.       else
  80.       {
  81.          if(eval("\x01") == 222)
  82.          {
  83.             set("\x01",eval("\x01") - 141);
  84.             if(!_global.com)
  85.             {
  86.                _global.com = new Object();
  87.             }
  88.             function ┬º\x01\x02┬º()
  89.             {
  90.                return 1631 % 511 * 5;
  91.             }
  92.             if(!_global.com.evilfree)
  93.             {
  94.                _global.com.evilfree = new Object();
  95.             }
  96.             ┬º┬ºpop();
  97.             if(!_global.com.evilfree.astroidsRevenge)
  98.             {
  99.                _global.com.evilfree.astroidsRevenge = new Object();
  100.             }
  101.             ┬º┬ºpop();
  102.             if(!_global.com.evilfree.astroidsRevenge.Main)
  103.             {
  104.                var _loc2_ = com.evilfree.astroidsRevenge.Main = function(target_mc)
  105.                {
  106.                   this.my_mc = target_mc.createEmptyMovieClip("main",1);
  107.                   this.userSettings = SharedObject.getLocal("asteroidsRevengeSettings");
  108.                   if(this.userSettings.data.musicVolume != undefined)
  109.                   {
  110.                      this.musicVolume = this.userSettings.data.musicVolume;
  111.                   }
  112.                   else
  113.                   {
  114.                      this.musicVolume = 30;
  115.                      this.userSettings.data.musicVolume = 30;
  116.                   }
  117.                   if(this.userSettings.data.soundVolume != undefined)
  118.                   {
  119.                      this.soundVolume = this.userSettings.data.soundVolume;
  120.                   }
  121.                   else
  122.                   {
  123.                      this.soundVolume = 100;
  124.                      this.userSettings.data.soundVolume = 100;
  125.                   }
  126.                   this.fakeRandom = new com.evilfree.astroidsRevenge.FakeRandom();
  127.                   this.musicList = [];
  128.                   this.musicList.push("dj-spooky-complete.mp3");
  129.                   this.mySqrt = Math.sqrt;
  130.                   this.mySin = Math.sin;
  131.                   this.myCos = Math.cos;
  132.                   this.myAtan = Math.atan2;
  133.                   this.radian = 57.29577951308232;
  134.                   this.levelWidth = 650;
  135.                   this.levelHeight = 500;
  136.                   this.levelRect = new flash.geom.Rectangle(0,0,this.levelWidth,this.levelHeight);
  137.                   this.levelPoint = new flash.geom.Point(0,0);
  138.                   this.myBitmap = new flash.display.BitmapData(this.levelWidth,this.levelHeight,false,0);
  139.                   this.backgroundBitmap1 = flash.display.BitmapData.loadBitmap("background1");
  140.                   this.backgroundBitmap2 = flash.display.BitmapData.loadBitmap("background2");
  141.                   this.backgroundMusic = new Sound(_root.musicSound_mc);
  142.                   Mouse.addListener(this);
  143.                   Key.addListener(this);
  144.                }.prototype;
  145.                _loc2_.createMovieClips = function()
  146.                {
  147.                   this.my_mc.attachBitmap(this.myBitmap,3);
  148.                   this.astroids_mc = this.my_mc.createEmptyMovieClip("astroids",4);
  149.                   this.ships_mc = this.my_mc.createEmptyMovieClip("ships",5);
  150.                   this.sprite_mc = this.my_mc.createEmptyMovieClip("spriteEngine",9);
  151.                   this.line_mc = this.my_mc.createEmptyMovieClip("line",6);
  152.                   this.levelOverlay_mc = this.my_mc.createEmptyMovieClip("levelOverlay",20);
  153.                   this.levelExit_mc = this.my_mc.createEmptyMovieClip("levelExit",15);
  154.                };
  155.                _loc2_.startGame = function()
  156.                {
  157.                   this.createMovieClips();
  158.                   _root.inGameMenu._visible = false;
  159.                   this.my_mc._visible = true;
  160.                   if(this.spriteLibrary == undefined)
  161.                   {
  162.                      this.spriteLibrary = new com.evilfree.astroidsRevenge.SpriteLibrary(this,this.sprite_mc);
  163.                   }
  164.                   this.myID = Math.round(Math.random() * 1000);
  165.                   this.currentLevel = _root.currentLevel;
  166.                   this.asteroidSpeed = _root.speed;
  167.                   this.asteroidArmor = _root.armor;
  168.                   this.asteroidSpin = _root.spin;
  169.                   this.bonusLevel = 0;
  170.                   this.shipCountNeededForNextLevel = 1;
  171.                   this.readyToExit = false;
  172.                   this.readyToStartNextLevel = false;
  173.                   this.backgroundNum = 1;
  174.                   this.gameIsOver = false;
  175.                   _root.bossDeathSize = 0;
  176.                   this.nextLevelCounter = 0;
  177.                   this.recordMode = false;
  178.                   this.playBackMode = false;
  179.                   this.setMouseDown = false;
  180.                   this.mouseDown = false;
  181.                   this.playerMouseX = 0;
  182.                   this.playerMouseY = 0;
  183.                   this.setRingDistance = 3;
  184.                   this.ringDistance = 3;
  185.                   this.astroidList = [];
  186.                   this.shipList = [];
  187.                   this.bulletList = [];
  188.                   this.shipCount = 1;
  189.                   var me = this;
  190.                   this.destroyCount = 1;
  191.                   this.previousDestroyCount = this.destroyCount * 5 - 2;
  192.                   this.mouseMode = true;
  193.                   this.playerScore = 0;
  194.                   this.asteroidMatrix = {};
  195.                   this.helpTime = 60;
  196.                   this.currentCount = 0;
  197.                   this.playerAstroid = new com.evilfree.astroidsRevenge.Astroid(this,this.astroids_mc,60,this.asteroidMatrix);
  198.                   this.playerAstroid.setPosition(500,500);
  199.                   this.playerAstroid.hilite();
  200.                   this.astroidList.push(this.playerAstroid);
  201.                   this.frameCount = _root.frameCount;
  202.                   this.gameIsPaused = false;
  203.                   this.loadLevel();
  204.                   this.my_mc.onEnterFrame = function()
  205.                   {
  206.                      me.enterFrame();
  207.                   };
  208.                   this.playMusic();
  209.                };
  210.                _loc2_.getTotalSize = function()
  211.                {
  212.                   var _loc7_ = this.astroidList.length;
  213.                   var _loc6_ = 0;
  214.                   var _loc3_ = 0;
  215.                   while(_loc3_ < _loc7_)
  216.                   {
  217.                      var _loc4_ = this.astroidList[_loc3_];
  218.                      var _loc5_ = _loc4_.getSize();
  219.                      _loc6_ += Math.pow(_loc5_,2.4);
  220.                      _loc3_ = _loc3_ + 1;
  221.                   }
  222.                   _root.bossDeathSize = _loc6_;
  223.                };
  224.                _loc2_.getScore = function()
  225.                {
  226.                   return this.destroyCount - 1;
  227.                };
  228.                _loc2_.getTimeScore = function()
  229.                {
  230.                   return this.timeScore;
  231.                };
  232.                _loc2_.getMassScore = function()
  233.                {
  234.                   return this.massScore;
  235.                };
  236.                _loc2_.get_mc = function()
  237.                {
  238.                   return this.my_mc;
  239.                };
  240.                _loc2_.getAsteroidSpeed = function()
  241.                {
  242.                   return this.asteroidSpeed * 0.5 + 1.5;
  243.                };
  244.                _loc2_.getAsteroidArmor = function()
  245.                {
  246.                   return this.asteroidArmor - this.destroyCount / 400;
  247.                };
  248.                _loc2_.receiveRawPlayBackText = function(src)
  249.                {
  250.                   var _loc2_ = src.split("|");
  251.                   this.mouseXArray = _loc2_[0].split(",");
  252.                   this.mouseYArray = _loc2_[1].split(",");
  253.                   this.mouseDownArray = _loc2_[2].split(",");
  254.                   this.mouseDeltaArray = _loc2_[3].split(",");
  255.                   this.startGame();
  256.                };
  257.                _loc2_.getSound_mc = function()
  258.                {
  259.                   return _root.soundEffects_mc;
  260.                };
  261.                _loc2_.getPlayerInputs = function()
  262.                {
  263.                   var _loc2_ = Math.abs(this.playerMouseX - this.my_mc._xmouse);
  264.                   var _loc3_ = Math.abs(this.playerMouseY - this.my_mc._ymouse);
  265.                   if(_loc2_ > 10 || _loc3_ > 10)
  266.                   {
  267.                      this.mouseMode = true;
  268.                   }
  269.                   this.playerMouseX = this.my_mc._xmouse;
  270.                   this.playerMouseY = this.my_mc._ymouse;
  271.                   if(Key.isDown(this.userSettings.data.close1) || Key.isDown(this.userSettings.data.close2))
  272.                   {
  273.                      this.setRingDistance -= 1;
  274.                   }
  275.                   if(Key.isDown(this.userSettings.data.away1) || Key.isDown(this.userSettings.data.away2))
  276.                   {
  277.                      this.setRingDistance += 1;
  278.                   }
  279.                   if(this.setRingDistance < 1)
  280.                   {
  281.                      this.setRingDistance = 1;
  282.                   }
  283.                   if(this.setRingDistance > 9)
  284.                   {
  285.                      this.setRingDistance = 9;
  286.                   }
  287.                   this.ringDistance = this.setRingDistance;
  288.                   if(Key.isDown(this.userSettings.data.release1) || Key.isDown(this.userSettings.data.release2))
  289.                   {
  290.                      this.mouseDown = true;
  291.                   }
  292.                   else
  293.                   {
  294.                      this.mouseDown = this.setMouseDown;
  295.                   }
  296.                   if(this.recordMode)
  297.                   {
  298.                      this.mouseXArray.push(this.playerMouseX);
  299.                      this.mouseYArray.push(this.playerMouseY);
  300.                      this.mouseDownArray.push(Number(this.mouseDown));
  301.                      this.mouseDeltaArray.push(this.ringDistance);
  302.                   }
  303.                   if(this.playBackMode)
  304.                   {
  305.                      this.playerMouseX = Number(this.mouseXArray[this.frameCount]);
  306.                      this.playerMouseY = Number(this.mouseYArray[this.frameCount]);
  307.                      this.mouseDown = Boolean(Number(this.mouseDownArray[this.frameCount]));
  308.                      this.ringDistance = Number(this.mouseDeltaArray[this.frameCount]);
  309.                   }
  310.                };
  311.                _loc2_.stopMusic = function()
  312.                {
  313.                   this.backgroundMusic.stop();
  314.                   var _loc4_ = this.shipList.length;
  315.                   var _loc2_ = 0;
  316.                   while(_loc2_ < _loc4_)
  317.                   {
  318.                      var _loc3_ = this.shipList[_loc2_];
  319.                      _loc3_.stopSound();
  320.                      _loc2_ = _loc2_ + 1;
  321.                   }
  322.                   this.my_mc._visible = false;
  323.                   delete this.my_mc.onEnterFrame;
  324.                };
  325.                _loc2_.nextTrack = function()
  326.                {
  327.                   this.playMusic();
  328.                };
  329.                _loc2_.playMusic = function()
  330.                {
  331.                   var _loc3_ = this.musicList[this.currentTrack];
  332.                   this.backgroundMusic.attachSound("dj-spooky-complete.mp3");
  333.                   this.backgroundMusic.setVolume(this.musicVolume);
  334.                   this.backgroundMusic.start(0,500000);
  335.                   _root.music.text = _loc3_;
  336.                };
  337.                _loc2_.getPlayerAsteroid = function()
  338.                {
  339.                   return this.playerAstroid;
  340.                };
  341.                _loc2_.loadLevel = function()
  342.                {
  343.                   this.readyToStartNextLevel = false;
  344.                   this.readyToExit = false;
  345.                   this.nextLevelIsBonus = true;
  346.                   this.shipCountNeededForNextLevel = 0;
  347.                   if(this.currentLevel == 1)
  348.                   {
  349.                      this.autoSpawn = false;
  350.                      this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"training1",100);
  351.                      this.autoSpawn = false;
  352.                      this.createPlacedShip(-50,250,100,250,{type:"ship"});
  353.                   }
  354.                   if(this.currentLevel == 2)
  355.                   {
  356.                      this.autoSpawn = false;
  357.                      this.createShipColumn(750,550,140,475,15,{type:"ship"});
  358.                      this.createShipColumn(650,500,140,475,15,{type:"ship"});
  359.                   }
  360.                   if(this.currentLevel == 3)
  361.                   {
  362.                      this.createShipColumn(-250,50,150,475,15,{type:"ship"});
  363.                      this.createShipColumn(-175,100,150,475,15,{type:"ship"});
  364.                      this.createShipColumn(-100,150,150,475,15,{type:"ship"});
  365.                      this.createShipColumn(-25,200,150,475,15,{type:"ship"});
  366.                   }
  367.                   if(this.currentLevel == 4)
  368.                   {
  369.                      this.createShipRow(50,600,-50,100,15,{type:"ship"});
  370.                      this.createShipRow(50,600,600,450,15,{type:"ship"});
  371.                   }
  372.                   if(this.currentLevel == 5)
  373.                   {
  374.                      this.createShipColumn(-250,60,140,475,15,{type:"ship"});
  375.                      this.createShipColumn(-175,120,140,475,15,{type:"ship"});
  376.                      this.createShipColumn(800,590,140,475,15,{type:"ship"});
  377.                      this.createShipColumn(700,530,140,475,15,{type:"ship"});
  378.                      this.spreadShotClock();
  379.                   }
  380.                   if(this.currentLevel == 6)
  381.                   {
  382.                      this.levelAllyPickup = 0;
  383.                      var _loc3_ = 55;
  384.                      var _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  385.                      this.shipCount = this.shipCount + 1;
  386.                      _loc2_.setPosition(-150,-150);
  387.                      _loc2_.setTarget(100,100);
  388.                      this.shipList.push(_loc2_);
  389.                      this.addPowerUp(700,425,600,425,"ally","levelAllyPickup");
  390.                      this.addPowerUp(700,60,600,60,"ally","levelAllyPickup");
  391.                      this.addPowerUp(-100,425,60,425,"ally","levelAllyPickup");
  392.                   }
  393.                   if(this.currentLevel == 7)
  394.                   {
  395.                      this.levelOverlay.destroy();
  396.                      this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"asteroidHelp2",100);
  397.                      _loc3_ = 90;
  398.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  399.                      this.shipCount = this.shipCount + 1;
  400.                      _loc2_.setPosition(750,-250);
  401.                      _loc2_.setTarget(480,150);
  402.                      this.shipList.push(_loc2_);
  403.                   }
  404.                   if(this.currentLevel == 8)
  405.                   {
  406.                      this.levelOverlay.destroy();
  407.                      _loc3_ = 90;
  408.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  409.                      this.shipCount = this.shipCount + 1;
  410.                      _loc2_.setPosition(750,-250);
  411.                      _loc2_.setTarget(480,80);
  412.                      this.shipList.push(_loc2_);
  413.                      _loc3_ = 90;
  414.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  415.                      this.shipCount = this.shipCount + 1;
  416.                      _loc2_.setPosition(750,650);
  417.                      _loc2_.setTarget(480,420);
  418.                      this.shipList.push(_loc2_);
  419.                      _loc3_ = 90;
  420.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  421.                      this.shipCount = this.shipCount + 1;
  422.                      _loc2_.setPosition(850,250);
  423.                      _loc2_.setTarget(480,250);
  424.                      this.shipList.push(_loc2_);
  425.                      this.addPowerUp(-100,425,60,425,"ally","levelAllyPickup");
  426.                      this.createShipColumn(750,550,40,460,20,{type:"ship"});
  427.                      this.createShipColumn(780,580,40,460,20,{type:"ship"});
  428.                      this.createShipColumn(810,612,40,460,20,{type:"ship"});
  429.                   }
  430.                   if(this.currentLevel == 9)
  431.                   {
  432.                      this.createShipRow(50,600,-50,100,15,{type:"ship"});
  433.                      this.createShipRow(50,600,600,450,15,{type:"ship"});
  434.                      this.setImmuneClock(300);
  435.                   }
  436.                   if(this.currentLevel == 10)
  437.                   {
  438.                      this.createShipColumn(-250,60,60,475,15,{type:"ship"});
  439.                      this.createShipColumn(800,590,60,475,15,{type:"ship"});
  440.                      this.createShipRow(90,600,-50,60,15,{type:"ship"});
  441.                      this.createShipRow(90,600,600,450,15,{type:"ship"});
  442.                      this.spreadShotClock();
  443.                      this.setImmuneClock(450);
  444.                   }
  445.                   if(this.currentLevel == 11)
  446.                   {
  447.                      this.backgroundNum = 2;
  448.                      this.createShipColumn(-50,60,60,475,8,{type:"minePlayer",size:40});
  449.                   }
  450.                   if(this.currentLevel == 12)
  451.                   {
  452.                      this.createShipColumn(-50,60,60,475,8,{type:"mineAlly",size:40});
  453.                   }
  454.                   if(this.currentLevel == 13)
  455.                   {
  456.                      this.createShipColumn(-50,60,60,475,3,{type:"mine",size:30});
  457.                   }
  458.                   if(this.currentLevel == 14)
  459.                   {
  460.                      this.createShipColumn(-50,70,60,475,20,{type:"ship",size:40});
  461.                      this.createShipColumn(-50,140,60,475,20,{type:"ship",size:40});
  462.                      this.createShipColumn(-50,200,60,475,12,{type:"mineAlly",size:30});
  463.                   }
  464.                   if(this.currentLevel == 15)
  465.                   {
  466.                      this.createShipColumn(-50,70,60,475,20,{type:"ship",size:40});
  467.                      this.createShipColumn(-50,140,60,475,20,{type:"ship",size:40});
  468.                      this.createShipColumn(-50,200,60,475,12,{type:"minePlayer",size:30});
  469.                   }
  470.                   if(this.currentLevel == 16)
  471.                   {
  472.                      this.createShipColumn(-100,100,250,250,1,{type:"fast",size:30});
  473.                   }
  474.                   if(this.currentLevel == 17)
  475.                   {
  476.                      this.createShipColumn(-100,100,120,450,7,{type:"fast",size:30});
  477.                      this.createShipColumn(650,550,120,450,7,{type:"fast",size:30});
  478.                   }
  479.                   if(this.currentLevel == 18)
  480.                   {
  481.                      this.createShipColumn(-100,100,120,450,14,{type:"fast",size:15,acceleration:2.5});
  482.                      this.createShipColumn(650,550,120,450,14,{type:"fast",size:15,acceleration:2.5});
  483.                   }
  484.                   if(this.currentLevel == 19)
  485.                   {
  486.                      this.createShipColumn(-50,70,60,475,20,{type:"ship",size:40});
  487.                      this.createShipColumn(-50,140,60,475,20,{type:"ship",size:40});
  488.                      this.createShipColumn(-75,200,60,475,8,{type:"mineAlly",size:30});
  489.                      this.createShipColumn(-50,250,60,475,8,{type:"minePlayer",size:30});
  490.                      this.addPowerUp(700,-100,600,100,"ally","none");
  491.                   }
  492.                   if(this.currentLevel == 20)
  493.                   {
  494.                      this.createShipColumn(-50,40,60,475,20,{type:"ship",size:40});
  495.                      this.createShipColumn(-50,80,60,475,20,{type:"ship",size:40});
  496.                      this.createShipColumn(-100,120,60,475,8,{type:"minePlayer",size:30});
  497.                      this.createShipColumn(-75,180,60,475,8,{type:"mineAlly",size:30});
  498.                      this.createShipColumn(-50,240,60,475,8,{type:"minePlayer",size:30});
  499.                      this.addPowerUp(700,-100,600,100,"ally","none");
  500.                   }
  501.                   if(this.currentLevel == 21)
  502.                   {
  503.                      this.createShipColumn(-50,40,60,475,20,{type:"ship",size:40});
  504.                      this.createShipColumn(-50,80,60,475,20,{type:"ship",size:40});
  505.                      this.createShipColumn(-100,100,60,475,8,{type:"minePlayer",size:30});
  506.                      this.createShipColumn(-75,160,60,475,8,{type:"mineAlly",size:30});
  507.                      this.createShipColumn(-50,220,60,475,8,{type:"minePlayer",size:30});
  508.                      this.createShipColumn(-50,280,60,475,8,{type:"mineAlly",size:30});
  509.                      this.addPowerUp(700,-100,600,100,"ally","none");
  510.                   }
  511.                   if(this.currentLevel == 22)
  512.                   {
  513.                      this.createShipColumn(-200,150,250,250,1,{type:"mine",size:200});
  514.                      this.addPowerUp(700,-100,600,100,"ally","none");
  515.                   }
  516.                   if(this.currentLevel == 23)
  517.                   {
  518.                      _loc3_ = 80;
  519.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  520.                      this.shipCount = this.shipCount + 1;
  521.                      _loc2_.setPosition(750,750);
  522.                      _loc2_.setTarget(520,400);
  523.                      this.shipList.push(_loc2_);
  524.                      this.createShipColumn(750,550,340,440,7,{type:"ship"});
  525.                      this.createShipColumn(775,575,340,440,7,{type:"ship"});
  526.                      this.createShipColumn(800,600,340,440,7,{type:"ship"});
  527.                      this.spreadShotClock();
  528.                      this.createShipRow(50,600,-50,20,15,{type:"ship"});
  529.                      this.createShipRow(50,600,600,450,15,{type:"ship"});
  530.                      _loc3_ = 60;
  531.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  532.                      this.shipCount = this.shipCount + 1;
  533.                      _loc2_.setPosition(-150,-150);
  534.                      _loc2_.setTarget(100,100);
  535.                      this.shipList.push(_loc2_);
  536.                      this.createShipColumn(-1500,50,150,475,15,{type:"ship"});
  537.                      this.createShipColumn(-1750,100,150,475,15,{type:"ship"});
  538.                   }
  539.                   if(this.currentLevel == 24)
  540.                   {
  541.                      this.createPlacedShip(-50,250,100,250,{type:"ship"});
  542.                   }
  543.                   if(this.currentLevel == 25)
  544.                   {
  545.                      this.autoSpawn = false;
  546.                      this.createShipColumn(750,550,140,475,15,{type:"ship"});
  547.                      this.createShipColumn(650,500,140,475,15,{type:"ship"});
  548.                   }
  549.                   if(this.currentLevel == 26)
  550.                   {
  551.                      _loc3_ = 70;
  552.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  553.                      this.shipCount = this.shipCount + 1;
  554.                      _loc2_.setPosition(750,750);
  555.                      _loc2_.setTarget(530,440);
  556.                      this.shipList.push(_loc2_);
  557.                      _loc3_ = 70;
  558.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  559.                      this.shipCount = this.shipCount + 1;
  560.                      _loc2_.setPosition(750,-100);
  561.                      _loc2_.setTarget(530,60);
  562.                      this.shipList.push(_loc2_);
  563.                      this.createShipColumn(750,450,60,475,12,{type:"mineAlly",size:30});
  564.                      this.createShipColumn(700,400,60,475,12,{type:"minePlayer",size:30});
  565.                      this.createShipColumn(750,550,100,200,2,{type:"fast",size:15,acceleration:2});
  566.                      this.createShipColumn(650,500,100,200,2,{type:"fast",size:15,acceleration:2});
  567.                      this.createShipColumn(750,550,320,420,2,{type:"fast",size:15,acceleration:2});
  568.                      this.createShipColumn(650,500,320,420,2,{type:"fast",size:15,acceleration:2});
  569.                      _loc3_ = 100;
  570.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipBoss(this,this.ships_mc,_loc3_);
  571.                      this.shipCount = this.shipCount + 1;
  572.                      _loc2_.setPosition(700,250);
  573.                      _loc2_.setTarget(530,250);
  574.                      this.shipList.push(_loc2_);
  575.                      this.addPowerUp(-100,425,60,425,"ally","levelAllyPickup");
  576.                   }
  577.                   if(this.currentLevel == 27)
  578.                   {
  579.                      this.getTotalSize();
  580.                      this.saveTime();
  581.                      _loc3_ = 80;
  582.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,_loc3_);
  583.                      this.shipCount = this.shipCount + 1;
  584.                      _loc2_.setPosition(750,750);
  585.                      _loc2_.setTarget(520,400);
  586.                      this.shipList.push(_loc2_);
  587.                      this.addPowerUp(700,-100,600,100,"ally","none");
  588.                      this.addPowerUp(700,-100,500,100,"ally","none");
  589.                      this.autoSpawn = true;
  590.                      this.createShipColumn(-5500,50,150,475,15,{type:"ship"});
  591.                      this.createShipColumn(-5750,100,150,475,15,{type:"ship"});
  592.                   }
  593.                };
  594.                _loc2_.createLevelExit = function()
  595.                {
  596.                   if(this.currentLevel == 1)
  597.                   {
  598.                      this.levelOverlay.destroy();
  599.                      this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"nextStageHelp",100);
  600.                   }
  601.                   if(this.currentLevel == 6)
  602.                   {
  603.                      this.levelOverlay.destroy();
  604.                      this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"nextStageHelp2",100);
  605.                   }
  606.                   this.levelExit = new com.evilfree.astroidsRevenge.LevelExit(this,this.levelExit_mc,300);
  607.                   this.levelExit.setPosition(325,250);
  608.                   this.levelExit.setTarget(300,300);
  609.                };
  610.                _loc2_.checkExit = function()
  611.                {
  612.                   this.levelExit.animate();
  613.                   var _loc3_ = this.levelExit.checkAsteroids(this.astroidList);
  614.                   if(_loc3_)
  615.                   {
  616.                      this.nextLevelCounter = this.nextLevelCounter + 1;
  617.                      if(this.nextLevelCounter > 20)
  618.                      {
  619.                         if(this.readyToStartNextLevel == false)
  620.                         {
  621.                            if(this.nextLevelIsBonus)
  622.                            {
  623.                               this.nextBonusLevel();
  624.                               this.readyToExit = false;
  625.                               this.levelExit.get_mc().gotoAndPlay("leaveCircle");
  626.                               return undefined;
  627.                            }
  628.                            this.levelExit.get_mc().gotoAndStop("leaveCircle");
  629.                            this.levelOverlay.destroy();
  630.                            var _loc2_ = this.currentLevel + 1;
  631.                            if(_loc2_ == 2)
  632.                            {
  633.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"training2",60);
  634.                            }
  635.                            if(_loc2_ == 3)
  636.                            {
  637.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"training3",60);
  638.                            }
  639.                            if(_loc2_ == 4)
  640.                            {
  641.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"tactics1",60);
  642.                            }
  643.                            if(_loc2_ == 5)
  644.                            {
  645.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"tactics2",60);
  646.                            }
  647.                            if(_loc2_ == 6)
  648.                            {
  649.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"ally1",60);
  650.                            }
  651.                            if(_loc2_ == 7)
  652.                            {
  653.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"ally2",60);
  654.                            }
  655.                            if(_loc2_ == 8)
  656.                            {
  657.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"ally3",60);
  658.                            }
  659.                            if(_loc2_ == 9)
  660.                            {
  661.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"cloakRound1",60);
  662.                            }
  663.                            if(_loc2_ == 10)
  664.                            {
  665.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"cloakRound2",60);
  666.                            }
  667.                            if(_loc2_ == 11)
  668.                            {
  669.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"minesRound1",60);
  670.                            }
  671.                            if(_loc2_ == 12)
  672.                            {
  673.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"minesRound2",60);
  674.                            }
  675.                            if(_loc2_ == 13)
  676.                            {
  677.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"minesRound3",60);
  678.                            }
  679.                            if(_loc2_ == 14)
  680.                            {
  681.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"mineDefensePlayer",60);
  682.                            }
  683.                            if(_loc2_ == 15)
  684.                            {
  685.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"mineDefenseAlly",60);
  686.                            }
  687.                            if(_loc2_ == 16)
  688.                            {
  689.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"fastShips1",60);
  690.                            }
  691.                            if(_loc2_ == 17)
  692.                            {
  693.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"fastShips2",60);
  694.                            }
  695.                            if(_loc2_ == 18)
  696.                            {
  697.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"fastShips3",60);
  698.                            }
  699.                            if(_loc2_ == 19)
  700.                            {
  701.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"mineDefense2",60);
  702.                            }
  703.                            if(_loc2_ == 20)
  704.                            {
  705.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"mineDefense3",60);
  706.                            }
  707.                            if(_loc2_ == 21)
  708.                            {
  709.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"mineDefense4",60);
  710.                            }
  711.                            if(_loc2_ == 22)
  712.                            {
  713.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"mineDefense5",60);
  714.                            }
  715.                            if(_loc2_ == 23)
  716.                            {
  717.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"crazy1",60);
  718.                            }
  719.                            if(_loc2_ == 24)
  720.                            {
  721.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"calm1",60);
  722.                            }
  723.                            if(_loc2_ == 25)
  724.                            {
  725.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"calm2",60);
  726.                            }
  727.                            if(_loc2_ == 26)
  728.                            {
  729.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"boss",60);
  730.                            }
  731.                            if(_loc2_ == 27)
  732.                            {
  733.                               this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"final",60);
  734.                            }
  735.                         }
  736.                         this.readyToStartNextLevel = true;
  737.                      }
  738.                   }
  739.                   else
  740.                   {
  741.                      this.nextLevelCounter = this.nextLevelCounter - 1;
  742.                      if(this.nextLevelCounter < 0)
  743.                      {
  744.                         this.nextLevelCounter = 0;
  745.                      }
  746.                   }
  747.                   if(_loc3_ == false && this.readyToStartNextLevel)
  748.                   {
  749.                      if(!this.nextLevelIsBonus)
  750.                      {
  751.                         this.levelOverlay.fadeOut();
  752.                         this.levelExit.get_mc().play();
  753.                         this.levelExit.destroy();
  754.                         this.nextLevel();
  755.                      }
  756.                   }
  757.                };
  758.                _loc2_.nextLevel = function()
  759.                {
  760.                   this.currentLevel = this.currentLevel + 1;
  761.                   _root.currentLevel = this.currentLevel;
  762.                   this.loadLevel();
  763.                };
  764.                _loc2_.nextBonusLevel = function()
  765.                {
  766.                   this.bonusLevel = this.bonusLevel + 1;
  767.                   this.loadBonusLevel();
  768.                };
  769.                _loc2_.loadBonusLevel = function()
  770.                {
  771.                   if(this.currentLevel < 3)
  772.                   {
  773.                      this.shipCountNeededForNextLevel = 0;
  774.                      this.nextLevelIsBonus = false;
  775.                      this.levelOverlay.destroy();
  776.                      this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"bonus2",300);
  777.                      this.addPowerUp(325,650,325,425,"speed","none");
  778.                   }
  779.                   else
  780.                   {
  781.                      this.shipCountNeededForNextLevel = 4;
  782.                      this.nextLevelIsBonus = false;
  783.                      this.levelOverlay.destroy();
  784.                      this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"bonus1",300);
  785.                      this.addPowerUp(75,650,75,425,"armor","none");
  786.                      this.addPowerUp(200,650,200,425,"ally","none");
  787.                      this.addPowerUp(325,650,325,425,"grow","none");
  788.                      this.addPowerUp(450,650,450,425,"speed","none");
  789.                      this.addPowerUp(575,650,575,425,"spin","none");
  790.                   }
  791.                };
  792.                _loc2_.addPowerUp = function(startX, startY, endX, endY, powerType, event)
  793.                {
  794.                   var _loc2_ = undefined;
  795.                   if(powerType == "ally")
  796.                   {
  797.                      _loc2_ = new com.evilfree.astroidsRevenge.PowerUpAlly(this,this.ships_mc,event);
  798.                   }
  799.                   if(powerType == "armor")
  800.                   {
  801.                      _loc2_ = new com.evilfree.astroidsRevenge.PowerUpArmor(this,this.ships_mc,event);
  802.                   }
  803.                   if(powerType == "speed")
  804.                   {
  805.                      _loc2_ = new com.evilfree.astroidsRevenge.PowerUpSpeed(this,this.ships_mc,event);
  806.                   }
  807.                   if(powerType == "grow")
  808.                   {
  809.                      _loc2_ = new com.evilfree.astroidsRevenge.PowerUpGrow(this,this.ships_mc,event);
  810.                   }
  811.                   if(powerType == "spin")
  812.                   {
  813.                      _loc2_ = new com.evilfree.astroidsRevenge.PowerUpSpin(this,this.ships_mc,event);
  814.                   }
  815.                   _loc2_.setPosition(startX,startY);
  816.                   _loc2_.setTarget(endX,endY);
  817.                   this.shipList.push(_loc2_);
  818.                };
  819.                _loc2_.createPlacedShip = function(xPos, yPos, targetX, targetY, shipOptions)
  820.                {
  821.                   var _loc2_ = undefined;
  822.                   var _loc3_ = shipOptions.type;
  823.                   var _loc4_ = shipOptions.size;
  824.                   if(_loc3_ == undefined || _loc3_ == "ship")
  825.                   {
  826.                      _loc2_ = new com.evilfree.astroidsRevenge.Ship(this,this.ships_mc);
  827.                   }
  828.                   if(_loc3_ == "fast")
  829.                   {
  830.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipFast(this,this.ships_mc,_loc4_);
  831.                   }
  832.                   if(_loc3_ == "mine")
  833.                   {
  834.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipMine(this,this.ships_mc,_loc4_);
  835.                   }
  836.                   if(_loc3_ == "minePlayer")
  837.                   {
  838.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipMinePlayer(this,this.ships_mc,_loc4_);
  839.                   }
  840.                   if(_loc3_ == "mineAlly")
  841.                   {
  842.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipMineAlly(this,this.ships_mc,_loc4_);
  843.                   }
  844.                   if(shipOptions.acceleration != undefined)
  845.                   {
  846.                      _loc2_.setAcceleration(shipOptions.acceleration);
  847.                   }
  848.                   this.shipCount = this.shipCount + 1;
  849.                   _loc2_.setPosition(xPos,yPos);
  850.                   _loc2_.setTarget(targetX,targetY);
  851.                   this.shipList.push(_loc2_);
  852.                };
  853.                _loc2_.createShipColumn = function(startX, endX, startY, endY, num, shipOptions)
  854.                {
  855.                   var _loc4_ = (endY - startY) / num;
  856.                   var _loc2_ = startY;
  857.                   var _loc3_ = 0;
  858.                   while(_loc3_ < num)
  859.                   {
  860.                      this.createPlacedShip(startX,_loc2_,endX,_loc2_,shipOptions);
  861.                      _loc2_ += _loc4_;
  862.                      _loc3_ = _loc3_ + 1;
  863.                   }
  864.                };
  865.                _loc2_.createShipRow = function(startX, endX, startY, endY, num, shipOptions)
  866.                {
  867.                   var _loc4_ = (endX - startX) / num;
  868.                   var _loc2_ = startX;
  869.                   var _loc3_ = 0;
  870.                   while(_loc3_ < num)
  871.                   {
  872.                      this.createPlacedShip(_loc2_,startY,_loc2_,endY,shipOptions);
  873.                      _loc2_ += _loc4_;
  874.                      _loc3_ = _loc3_ + 1;
  875.                   }
  876.                };
  877.                _loc2_.receiveEvent = function(eventName)
  878.                {
  879.                   if(eventName == "levelAllyPickup")
  880.                   {
  881.                      this.levelAllyPickup = this.levelAllyPickup + 1;
  882.                   }
  883.                   if(this.levelAllyPickup == 3)
  884.                   {
  885.                      this.levelAllyPickup = 0;
  886.                      this.levelOverlay.destroy();
  887.                      this.levelOverlay = new com.evilfree.astroidsRevenge.LevelOverlay(this,this.levelOverlay_mc,"asteroidHelp",30);
  888.                   }
  889.                };
  890.                _loc2_.spreadShotClock = function()
  891.                {
  892.                   var _loc4_ = this.shipList.length;
  893.                   var _loc2_ = 0;
  894.                   while(_loc2_ < _loc4_)
  895.                   {
  896.                      var _loc3_ = this.shipList[_loc2_];
  897.                      _loc3_.setClockPercent(_loc2_ / _loc4_);
  898.                      _loc2_ = _loc2_ + 1;
  899.                   }
  900.                };
  901.                _loc2_.setImmuneClock = function(amount)
  902.                {
  903.                   var _loc4_ = this.shipList.length;
  904.                   var _loc2_ = 0;
  905.                   while(_loc2_ < _loc4_)
  906.                   {
  907.                      var _loc3_ = this.shipList[_loc2_];
  908.                      _loc3_.setImmuneClock(amount);
  909.                      _loc2_ = _loc2_ + 1;
  910.                   }
  911.                };
  912.                _loc2_.createAsteroid = function(x, y, size)
  913.                {
  914.                   var _loc2_ = new com.evilfree.astroidsRevenge.Astroid(this,this.astroids_mc,size,this.asteroidMatrix);
  915.                   _loc2_.setPosition(x,y);
  916.                   this.addAsteroid(_loc2_);
  917.                };
  918.                _loc2_.onMouseDown = function()
  919.                {
  920.                   this.setMouseDown = true;
  921.                };
  922.                _loc2_.onMouseUp = function()
  923.                {
  924.                   this.setMouseDown = false;
  925.                };
  926.                _loc2_.getMouseDown = function()
  927.                {
  928.                   return this.mouseDown;
  929.                };
  930.                _loc2_.getSpriteLibrary = function()
  931.                {
  932.                   return this.spriteLibrary;
  933.                };
  934.                _loc2_.onMouseWheel = function(delta)
  935.                {
  936.                   this.setRingDistance += delta / 3;
  937.                };
  938.                _loc2_.getRingDistance = function()
  939.                {
  940.                   return this.ringDistance * 10;
  941.                };
  942.                _loc2_.getBitmap = function()
  943.                {
  944.                   return this.myBitmap;
  945.                };
  946.                _loc2_.caclulateInputs = function()
  947.                {
  948.                   if(this.mouseMode)
  949.                   {
  950.                      var _loc2_ = this.playerMouseX - this.playerAstroid.getXPos();
  951.                      var _loc3_ = this.playerMouseY - this.playerAstroid.getYPos();
  952.                      var _loc4_ = Math.sqrt(_loc2_ * _loc2_ + _loc3_ * _loc3_);
  953.                      if(_loc4_ > 50)
  954.                      {
  955.                         var _loc5_ = 1;
  956.                      }
  957.                      else
  958.                      {
  959.                         _loc5_ = _loc4_ / 50;
  960.                      }
  961.                      var _loc6_ = this.myAtan(_loc3_,_loc2_);
  962.                      var _loc8_ = - this.myCos(_loc6_);
  963.                      var _loc7_ = - this.mySin(_loc6_);
  964.                      this.mouseAccX = _loc8_ * _loc5_;
  965.                      this.mouseAccY = _loc7_ * _loc5_;
  966.                   }
  967.                };
  968.                _loc2_.checkToAddAShip = function()
  969.                {
  970.                   this.currentCount = this.currentCount + 1;
  971.                   if(this.currentCount == this.helpTime)
  972.                   {
  973.                      this.currentCount = 0;
  974.                      this.createNewShip();
  975.                   }
  976.                };
  977.                _loc2_.pauseGame = function()
  978.                {
  979.                   this.gameIsPaused = true;
  980.                };
  981.                _loc2_.unPauseGame = function()
  982.                {
  983.                   this.gameIsPaused = false;
  984.                };
  985.                _loc2_.enterFrame = function()
  986.                {
  987.                   if(this.gameIsPaused)
  988.                   {
  989.                      return undefined;
  990.                   }
  991.                   if(this.gameIsOver)
  992.                   {
  993.                      return undefined;
  994.                   }
  995.                   this.asteroidMatrix = {};
  996.                   if(this.backgroundNum == 1)
  997.                   {
  998.                      this.myBitmap.copyPixels(this.backgroundBitmap1,this.levelRect,this.levelPoint);
  999.                   }
  1000.                   if(this.backgroundNum == 2 || this.backgroundNum == 3)
  1001.                   {
  1002.                      this.myBitmap.copyPixels(this.backgroundBitmap2,this.levelRect,this.levelPoint);
  1003.                   }
  1004.                   if(this.backgroundNum == 4)
  1005.                   {
  1006.                      var _loc14_ = this.spriteLibrary.getBitmap("alphaBack1");
  1007.                      this.myBitmap.copyPixels(this.backgroundBitmap2,this.levelRect,this.levelPoint,_loc14_,new flash.geom.Point(0,0),true);
  1008.                   }
  1009.                   if(this.backgroundNum == 5)
  1010.                   {
  1011.                      _loc14_ = this.spriteLibrary.getBitmap("alphaBack2");
  1012.                      this.myBitmap.copyPixels(this.backgroundBitmap2,this.levelRect,this.levelPoint,_loc14_,new flash.geom.Point(0,0),true);
  1013.                   }
  1014.                   if(this.backgroundNum == 6)
  1015.                   {
  1016.                      _loc14_ = this.spriteLibrary.getBitmap("alphaBack3");
  1017.                      this.myBitmap.copyPixels(this.backgroundBitmap2,this.levelRect,this.levelPoint,_loc14_,new flash.geom.Point(0,0),true);
  1018.                   }
  1019.                   if(this.backgroundNum == 7)
  1020.                   {
  1021.                      _loc14_ = this.spriteLibrary.getBitmap("alphaBack4");
  1022.                      this.myBitmap.copyPixels(this.backgroundBitmap2,this.levelRect,this.levelPoint,_loc14_,new flash.geom.Point(0,0),true);
  1023.                   }
  1024.                   if(this.backgroundNum == 8)
  1025.                   {
  1026.                      this.myBitmap.fillRect(this.levelRect,0);
  1027.                   }
  1028.                   this.getPlayerInputs();
  1029.                   this.frameCount = this.frameCount + 1;
  1030.                   _root.frameCount = this.frameCount;
  1031.                   _root.frameCountText.text = this.frameCount;
  1032.                   this.caclulateInputs();
  1033.                   if(this.autoSpawn)
  1034.                   {
  1035.                      this.checkToAddAShip();
  1036.                   }
  1037.                   var _loc13_ = this.astroidList.length;
  1038.                   var _loc8_ = this.shipList.length;
  1039.                   var _loc9_ = this.bulletList.length;
  1040.                   var _loc12_ = undefined;
  1041.                   var _loc10_ = 0;
  1042.                   var _loc11_ = 0;
  1043.                   var _loc4_ = 0;
  1044.                   while(_loc4_ < _loc13_)
  1045.                   {
  1046.                      var _loc3_ = this.astroidList[_loc4_];
  1047.                      var _loc5_ = _loc3_.getSize();
  1048.                      _loc11_ += _loc5_ * _loc5_;
  1049.                      if(_loc5_ > _loc10_)
  1050.                      {
  1051.                         _loc10_ = _loc3_.getSize();
  1052.                         _loc12_ = _loc3_;
  1053.                      }
  1054.                      _loc3_.animate();
  1055.                      _loc4_ = _loc4_ + 1;
  1056.                   }
  1057.                   if(_loc12_ != this.playerAstroid && this.mouseDown == false)
  1058.                   {
  1059.                      this.playerAstroid.unhilite();
  1060.                      this.playerAstroid = _loc12_;
  1061.                      this.playerAstroid.hilite();
  1062.                   }
  1063.                   this.playerAstroid.assignTargets();
  1064.                   _root.life.text = "" + Math.round(_loc12_.getLife());
  1065.                   _root.spinIndicator.text = "" + this.asteroidSpin;
  1066.                   _root.armorIndicator.text = "" + this.asteroidArmor;
  1067.                   _root.speedIndicator.text = "" + this.asteroidSpeed;
  1068.                   if(this.currentLevel == 27)
  1069.                   {
  1070.                      _root.levelIndicator.text = "FINAL";
  1071.                   }
  1072.                   else
  1073.                   {
  1074.                      _root.levelIndicator.text = "Level " + this.currentLevel + " of 27";
  1075.                   }
  1076.                   _root.shipCount.text = "" + (this.destroyCount - 1);
  1077.                   _loc4_ = 0;
  1078.                   while(_loc4_ < _loc9_)
  1079.                   {
  1080.                      var _loc7_ = this.bulletList[_loc4_];
  1081.                      _loc7_.animate();
  1082.                      _loc4_ = _loc4_ + 1;
  1083.                   }
  1084.                   _loc4_ = 0;
  1085.                   while(_loc4_ < _loc8_)
  1086.                   {
  1087.                      var _loc6_ = this.shipList[_loc4_];
  1088.                      _loc6_.animate();
  1089.                      _loc4_ = _loc4_ + 1;
  1090.                   }
  1091.                   _loc4_ = 0;
  1092.                   while(_loc4_ < _loc9_)
  1093.                   {
  1094.                      _loc7_ = this.bulletList[_loc4_];
  1095.                      _loc7_.drawMe();
  1096.                      _loc4_ = _loc4_ + 1;
  1097.                   }
  1098.                   _loc4_ = 0;
  1099.                   while(_loc4_ < _loc8_)
  1100.                   {
  1101.                      _loc6_ = this.shipList[_loc4_];
  1102.                      _loc6_.drawMe();
  1103.                      _loc4_ = _loc4_ + 1;
  1104.                   }
  1105.                   if(_loc8_ <= this.shipCountNeededForNextLevel && this.readyToExit == false)
  1106.                   {
  1107.                      while(this.shipList.length > 0)
  1108.                      {
  1109.                         this.shipList.pop().destroy();
  1110.                      }
  1111.                      this.readyToExit = true;
  1112.                      this.nextLevelCounter = 0;
  1113.                      this.createLevelExit();
  1114.                   }
  1115.                   if(this.readyToExit)
  1116.                   {
  1117.                      this.checkExit();
  1118.                   }
  1119.                };
  1120.                _loc2_.addAsteroidSpeed = function(amount)
  1121.                {
  1122.                   this.asteroidSpeed += amount;
  1123.                   _root.speed = this.asteroidSpeed;
  1124.                };
  1125.                _loc2_.addAsteroidArmor = function(amount)
  1126.                {
  1127.                   this.asteroidArmor += amount;
  1128.                   _root.armor = this.asteroidArmor;
  1129.                };
  1130.                _loc2_.addAsteroidSpin = function(amount)
  1131.                {
  1132.                   this.asteroidSpin += amount;
  1133.                   _root.spin = this.asteroidSpin;
  1134.                };
  1135.                _loc2_.getAsteroidSpin = function()
  1136.                {
  1137.                   return this.asteroidSpin + 1;
  1138.                };
  1139.                _loc2_.getAccelerationX = function(baseAcc)
  1140.                {
  1141.                   if(this.mouseMode)
  1142.                   {
  1143.                      return (- baseAcc) * this.mouseAccX;
  1144.                   }
  1145.                   if(Key.isDown(this.userSettings.data.left1) || Key.isDown(this.userSettings.data.left2))
  1146.                   {
  1147.                      return - baseAcc;
  1148.                   }
  1149.                   if(Key.isDown(this.userSettings.data.right1) || Key.isDown(this.userSettings.data.right2))
  1150.                   {
  1151.                      return baseAcc;
  1152.                   }
  1153.                   return 0;
  1154.                };
  1155.                _loc2_.getAccelerationY = function(baseAcc)
  1156.                {
  1157.                   if(this.mouseMode)
  1158.                   {
  1159.                      return (- baseAcc) * this.mouseAccY;
  1160.                   }
  1161.                   if(Key.isDown(this.userSettings.data.up1) || Key.isDown(this.userSettings.data.up2))
  1162.                   {
  1163.                      return - baseAcc;
  1164.                   }
  1165.                   if(Key.isDown(this.userSettings.data.down1) || Key.isDown(this.userSettings.data.down2))
  1166.                   {
  1167.                      return baseAcc;
  1168.                   }
  1169.                   return 0;
  1170.                };
  1171.                _loc2_.onKeyDown = function()
  1172.                {
  1173.                   if(Key.isDown(this.userSettings.data.up1) || Key.isDown(this.userSettings.data.up2) || Key.isDown(this.userSettings.data.down1) || Key.isDown(this.userSettings.data.down2) || Key.isDown(this.userSettings.data.left1) || Key.isDown(this.userSettings.data.up2) || Key.isDown(this.userSettings.data.right1) || Key.isDown(this.userSettings.data.right2))
  1174.                   {
  1175.                      this.mouseMode = false;
  1176.                   }
  1177.                   if(Key.isDown(com.evilfree.KeyCodeHelper.P))
  1178.                   {
  1179.                      if(_root.inGameMenu._visible == true)
  1180.                      {
  1181.                         this.unPauseGame();
  1182.                         _root.inGameMenu._visible = false;
  1183.                      }
  1184.                      else
  1185.                      {
  1186.                         this.pauseGame();
  1187.                         _root.inGameMenu.setState();
  1188.                         _root.inGameMenu._visible = true;
  1189.                      }
  1190.                   }
  1191.                   if(this.debugMode)
  1192.                   {
  1193.                      if(Key.isDown(com.evilfree.KeyCodeHelper.T))
  1194.                      {
  1195.                         this.createAsteroid(200,200,50);
  1196.                      }
  1197.                   }
  1198.                };
  1199.                _loc2_.getStageWidth = function()
  1200.                {
  1201.                   return this.levelWidth;
  1202.                };
  1203.                _loc2_.getStageHeight = function()
  1204.                {
  1205.                   return this.levelHeight;
  1206.                };
  1207.                _loc2_.createNewShip = function()
  1208.                {
  1209.                   if(this.shipList.length > 100)
  1210.                   {
  1211.                      return undefined;
  1212.                   }
  1213.                   if(this.shipCount % 500 == 0)
  1214.                   {
  1215.                      var _loc2_ = new com.evilfree.astroidsRevenge.PowerUpAlly(this,this.ships_mc,"none");
  1216.                   }
  1217.                   else if(this.shipCount % 400 == 0)
  1218.                   {
  1219.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipMine(this,this.ships_mc,50 + this.destroyCount / 100);
  1220.                   }
  1221.                   else if(this.shipCount % 300 == 0)
  1222.                   {
  1223.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipMinePlayer(this,this.ships_mc,50 + this.destroyCount / 100);
  1224.                   }
  1225.                   else if(this.shipCount % 100 == 0)
  1226.                   {
  1227.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipRepulse(this,this.ships_mc,50);
  1228.                   }
  1229.                   else if(this.shipCount % 40 == 0)
  1230.                   {
  1231.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipMineAlly(this,this.ships_mc,30 + this.destroyCount / 100);
  1232.                   }
  1233.                   else if(this.shipCount % 10 == 0)
  1234.                   {
  1235.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipFast(this,this.ships_mc,30);
  1236.                   }
  1237.                   else
  1238.                   {
  1239.                      _loc2_ = new com.evilfree.astroidsRevenge.Ship(this,this.ships_mc);
  1240.                   }
  1241.                   if(this.currentLevel == 13)
  1242.                   {
  1243.                      _loc2_ = new com.evilfree.astroidsRevenge.ShipMine(this,this.ships_mc,25);
  1244.                   }
  1245.                   this.shipCount = this.shipCount + 1;
  1246.                   if(this.shipCount > 1000 && this.currentLevel == 12)
  1247.                   {
  1248.                      return undefined;
  1249.                   }
  1250.                   var _loc3_ = this.getFakeRandom();
  1251.                   var _loc5_ = this.getStageWidth() - 50;
  1252.                   var _loc4_ = this.getStageHeight() - 50;
  1253.                   if(_loc3_ > 0.75)
  1254.                   {
  1255.                      _loc2_.setPosition(-100,this.getFakeRandom() * this.getStageHeight());
  1256.                      _loc2_.setTarget(this.getFakeRandom() * 200 + 25,this.getFakeRandom() * _loc4_ + 25);
  1257.                   }
  1258.                   else if(_loc3_ > 0.5)
  1259.                   {
  1260.                      _loc2_.setPosition(this.getFakeRandom() * this.getStageWidth(),-100);
  1261.                      _loc2_.setTarget(this.getFakeRandom() * this.getStageWidth() + 25,this.getFakeRandom() * 150 + 25);
  1262.                   }
  1263.                   else if(_loc3_ > 0.25)
  1264.                   {
  1265.                      _loc2_.setPosition(this.getStageWidth() + 100,this.getFakeRandom() * this.getStageHeight());
  1266.                      _loc2_.setTarget(this.getFakeRandom() * 150 + this.getStageWidth() - 175,this.getFakeRandom() * _loc4_ + 25);
  1267.                   }
  1268.                   else
  1269.                   {
  1270.                      _loc2_.setPosition(this.getFakeRandom() * this.getStageWidth(),this.getStageHeight() + 100);
  1271.                      _loc2_.setTarget(this.getFakeRandom() * this.getStageWidth() + 25,this.getFakeRandom() * 150 + this.getStageHeight() - 175);
  1272.                   }
  1273.                   this.shipList.push(_loc2_);
  1274.                };
  1275.                _loc2_.getFakeRandom = function()
  1276.                {
  1277.                   var _loc2_ = this.frameCount + this.playerMouseX + this.playerMouseY;
  1278.                   return this.fakeRandom.getRandom(_loc2_);
  1279.                };
  1280.                _loc2_.createBullet = function(xPos, yPos, angle, damageAmount)
  1281.                {
  1282.                   var _loc2_ = new com.evilfree.astroidsRevenge.Bullet(this,this.bullet_mc);
  1283.                   _loc2_.setDamage(damageAmount);
  1284.                   var _loc6_ = Math.cos(angle / this.radian);
  1285.                   var _loc5_ = Math.sin(angle / this.radian);
  1286.                   var _loc4_ = 3 * _loc6_;
  1287.                   var _loc3_ = 3 * _loc5_;
  1288.                   _loc2_.setVelocity(_loc4_,_loc3_);
  1289.                   _loc2_.setPosition(xPos + _loc4_ * 1,yPos + _loc3_ * 1);
  1290.                   this.bulletList.push(_loc2_);
  1291.                };
  1292.                _loc2_.removeBullet = function(b)
  1293.                {
  1294.                   var _loc4_ = this.bulletList.length;
  1295.                   var _loc2_ = 0;
  1296.                   while(_loc2_ < _loc4_)
  1297.                   {
  1298.                      if(this.bulletList[_loc2_] == b)
  1299.                      {
  1300.                         this.bulletList.splice(_loc2_,1);
  1301.                         b.destroy();
  1302.                         break;
  1303.                      }
  1304.                      _loc2_ = _loc2_ + 1;
  1305.                   }
  1306.                };
  1307.                _loc2_.removeShip = function(s)
  1308.                {
  1309.                   if(this.previousDestroyCount != this.destroyCount * 5 - 2)
  1310.                   {
  1311.                      _root.gotoAndPlay(1);
  1312.                   }
  1313.                   this.destroyCount = this.destroyCount + 1;
  1314.                   this.previousDestroyCount = this.destroyCount * 5 - 2;
  1315.                   var _loc4_ = this.shipList.length;
  1316.                   this.playerScore += 10 * _loc4_;
  1317.                   var _loc3_ = 0;
  1318.                   while(_loc3_ < _loc4_)
  1319.                   {
  1320.                      if(this.shipList[_loc3_] == s)
  1321.                      {
  1322.                         this.shipList.splice(_loc3_,1);
  1323.                         break;
  1324.                      }
  1325.                      _loc3_ = _loc3_ + 1;
  1326.                   }
  1327.                   if(this.autoSpawn)
  1328.                   {
  1329.                      this.createNewShip();
  1330.                   }
  1331.                };
  1332.                _loc2_.addAsteroid = function(astroid)
  1333.                {
  1334.                   this.astroidList.push(astroid);
  1335.                };
  1336.                _loc2_.removeAstroid = function(astroid)
  1337.                {
  1338.                   var _loc5_ = this.astroidList.length;
  1339.                   if(this.astroidList.length == 1 && this.astroidList[0] == astroid)
  1340.                   {
  1341.                      var _loc3_ = undefined;
  1342.                      while(_loc3_ < this.shipList.length)
  1343.                      {
  1344.                         this.shipList[_loc3_].stopSound();
  1345.                         _loc3_ = _loc3_ + 1;
  1346.                      }
  1347.                      this.playerAstroid = new com.evilfree.astroidsRevenge.Astroid(this,this.astroids_mc,60,this.asteroidMatrix);
  1348.                      this.playerAstroid.setPosition(1500,1500);
  1349.                      this.playerAstroid.hilite();
  1350.                      this.astroidList.push(this.playerAstroid);
  1351.                      this.gameIsOver = true;
  1352.                      if(this.currentLevel < 27)
  1353.                      {
  1354.                         _root.ending = 1;
  1355.                      }
  1356.                      else
  1357.                      {
  1358.                         _root.ending = 2;
  1359.                         if(this.destroyCount >= 3000)
  1360.                         {
  1361.                            _root.ending = 3;
  1362.                         }
  1363.                         if(this.destroyCount >= 6000)
  1364.                         {
  1365.                            _root.ending = 4;
  1366.                         }
  1367.                      }
  1368.                      _root.gotoAndPlay("Game Over");
  1369.                      if(!this.recordMode)
  1370.                      {
  1371.                      }
  1372.                      _root.kongregateScores.submit(this.destroyCount);
  1373.                      _root.gameOver.destroyed.text = "Ships Destroyed:  " + (this.destroyCount - 1);
  1374.                      if(this.currentLevel < 27)
  1375.                      {
  1376.                         _root.gameOver.mass.text = "BOSS STILL LIVES!";
  1377.                         _root.gameOver.time.text = "BOSS STILL LIVES!";
  1378.                      }
  1379.                      else
  1380.                      {
  1381.                         var _loc6_ = Math.sqrt(_root.bossDeathSize);
  1382.                         _loc6_ = Math.round(_loc6_ * 100);
  1383.                         _root.gameOver.mass.text = "Mass: " + _loc6_;
  1384.                         this.massScore = _loc6_;
  1385.                         _root.gameOver.time.text = "Time:  " + this.timeScore;
  1386.                      }
  1387.                   }
  1388.                   else
  1389.                   {
  1390.                      _loc3_ = 0;
  1391.                      while(_loc3_ < _loc5_)
  1392.                      {
  1393.                         if(this.astroidList[_loc3_] == astroid)
  1394.                         {
  1395.                            this.astroidList.splice(_loc3_,1);
  1396.                            if(astroid == this.playerAstroid)
  1397.                            {
  1398.                               this.playerAstroid = this.astroidList[0];
  1399.                               this.playerAstroid.hilite();
  1400.                            }
  1401.                         }
  1402.                         _loc3_ = _loc3_ + 1;
  1403.                      }
  1404.                   }
  1405.                };
  1406.                _loc2_.saveTime = function()
  1407.                {
  1408.                   var _loc2_ = this.frameCount / 30;
  1409.                   var _loc3_ = Math.floor(_loc2_ / 60);
  1410.                   _loc2_ -= _loc3_ * 60;
  1411.                   _loc2_ = Math.round(_loc2_ * 100) / 100;
  1412.                   this.timeScore = "" + _loc3_ + ":" + _loc2_;
  1413.                };
  1414.                _loc2_.getAsteroidsFromGrid = function(gridX, gridY)
  1415.                {
  1416.                   return this.asteroidMatrix[gridX + "_" + gridY];
  1417.                };
  1418.                _loc2_.addToAsteroidGrid = function(gridX, gridY, asteroid)
  1419.                {
  1420.                   if(this.asteroidMatrix[gridX + "_" + gridY] == undefined)
  1421.                   {
  1422.                      this.asteroidMatrix[gridX + "_" + gridY] = [];
  1423.                   }
  1424.                   this.asteroidMatrix[gridX + "_" + gridY].push(asteroid);
  1425.                };
  1426.                _loc2_.getAstroidList = function()
  1427.                {
  1428.                   return this.astroidList;
  1429.                };
  1430.                _loc2_.getShipList = function()
  1431.                {
  1432.                   return this.shipList;
  1433.                };
  1434.                _loc2_.getRandomAstroid = function()
  1435.                {
  1436.                   var _loc3_ = this.astroidList.length;
  1437.                   var _loc2_ = Math.floor(this.getFakeRandom() * _loc3_);
  1438.                   return this.astroidList[_loc2_];
  1439.                };
  1440.                _loc2_.getMusicVolume = function()
  1441.                {
  1442.                   return this.musicVolume;
  1443.                };
  1444.                _loc2_.getSoundVolume = function()
  1445.                {
  1446.                   return this.soundVolume;
  1447.                };
  1448.                _loc2_.setMusicVolume = function(v)
  1449.                {
  1450.                   this.musicVolume = v;
  1451.                   this.userSettings.data.musicVolume = v;
  1452.                   this.backgroundMusic.setVolume(v);
  1453.                };
  1454.                _loc2_.setSoundVolume = function(v)
  1455.                {
  1456.                   this.soundVolume = v;
  1457.                   this.userSettings.data.soundVolume = v;
  1458.                   var _loc4_ = this.shipList.length;
  1459.                   var _loc2_ = 0;
  1460.                   while(_loc2_ < _loc4_)
  1461.                   {
  1462.                      var _loc3_ = this.shipList[_loc2_];
  1463.                      _loc3_.adjustVolume();
  1464.                      _loc2_ = _loc2_ + 1;
  1465.                   }
  1466.                };
  1467.                _loc2_.mouseXArray = [];
  1468.                _loc2_.mouseYArray = [];
  1469.                _loc2_.mouseDownArray = [];
  1470.                _loc2_.mouseDeltaArray = [];
  1471.                ┬º┬ºpush(ASSetPropFlags(com.evilfree.astroidsRevenge.Main.prototype,null,1));
  1472.             }
  1473.             ┬º┬ºpop();
  1474.             break;
  1475.          }
  1476.          if(eval("\x01") == 478)
  1477.          {
  1478.             set("\x01",eval("\x01") - 307);
  1479.             ┬º┬ºpush("\x0f");
  1480.             ┬º┬ºpush(1);
  1481.          }
  1482.          else if(eval("\x01") == 233)
  1483.          {
  1484.             set("\x01",eval("\x01") + 245);
  1485.          }
  1486.          else if(eval("\x01") == 528)
  1487.          {
  1488.             set("\x01",eval("\x01") - 350);
  1489.             if(function ┬º\x01\x02┬º()
  1490.             {
  1491.                return 1631 % 511 * 5;
  1492.             })
  1493.             {
  1494.                set("\x01",eval("\x01") - 24);
  1495.             }
  1496.          }
  1497.          else if(eval("\x01") == 154)
  1498.          {
  1499.             set("\x01",eval("\x01") + 427);
  1500.          }
  1501.          else if(eval("\x01") == 847)
  1502.          {
  1503.             set("\x01",eval("\x01") - 266);
  1504.          }
  1505.          else
  1506.          {
  1507.             if(eval("\x01") != 581)
  1508.             {
  1509.                if(eval("\x01") == 494)
  1510.                {
  1511.                   set("\x01",eval("\x01") - 261);
  1512.                   break;
  1513.                }
  1514.                if(eval("\x01") == 81)
  1515.                {
  1516.                   set("\x01",eval("\x01") - 81);
  1517.                }
  1518.                break;
  1519.             }
  1520.             set("\x01",eval("\x01") + 256);
  1521.             ┬º┬ºpush(true);
  1522.          }
  1523.       }
  1524.    }
  1525. }
  1526.